package com.cmfi.utils;

public class Result {
	//返回给前端的JSON数据
    private Object data;
    //错误码，赋值对应的值
    private Integer code;
    //错误message，出现异常、错误时赋值
    private String msg;
    //data元素总数
    private long total;
    //pda软安灯操作者
    private String roleId;

	public Result() {
	}

	public Result(Integer code, Object data) {
		this.data = data;
		this.code = code;
	}
	

	public Result(Integer code, Object data, long total) {
		this.data = data;
		this.code = code;
		this.total = total;
	}

	public Result(Integer code, String msg) {
		this.msg = msg;
		this.code = code;
	}

	public Result(Integer code, Object data, String msg) {
		this.data = data;
		this.code = code;
		this.msg = msg;
	}

	public Result(Object data, Integer code, String msg, long total) {
		super();
		this.data = data;
		this.code = code;
		this.msg = msg;
		this.total = total;
	}
	
	public Result(Object data, Integer code, String msg, String roleId) {
		super();
		this.data = data;
		this.code = code;
		this.msg = msg;
		this.roleId = roleId;
	}
	
	public Result(Integer code, String msg, String roleId) {
		super();
		this.code = code;
		this.msg = msg;
		this.roleId = roleId;
	}
	
	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
